<?
$config = array(
                 'edit_user' => array(
                                    array(
                                            'field' => 'username',
                                            'label' => 'Username',
                                            'rules' => 'required|min_length[3]|max_length[10]|alpha'
                                         ),
                                    array(
                                            'field' => 'password',
                                            'label' => 'Password',
                                            'rules' => 'min_length[6]|max_length[20]'
                                         ),
                                    array(
                                            'field' => 'email',
                                            'label' => 'Email',
                                            'rules' => 'required|valid_email|callback_validate_email'
                                         ),
                                    array(
                                            'field' => 'enabled',
                                            'label' => 'Enabled',
                                            'rules' => 'numeric|less_than[2]'
                                         ),
                                    array(
                                            'field' => 'group',
                                            'label' => 'Group',
                                            'rules' => 'required|numeric|exists[groups.id]'
                                         ),
                                    array(
                                            'field' => 'first_name',
                                            'label' => 'First name',
                                            'rules' => 'alpha|min[3]|max[20]'
                                         ),
                                    array(
                                            'field' => 'last_name',
                                            'label' => 'Last name',
                                            'rules' => 'alpha|min[3]|max[20]'
                                         )
                                    ),
                 'create_group' => array(
                                    array(
                                            'field' => 'name',
                                            'label' => 'Name',
                                            'rules' => 'required|alpha|min_length[3]|max_length[10]'
                                         ),
                                    array(
                                            'field' => 'description',
                                            'label' => 'Description',
                                            'rules' => 'max_length[50]'
                                         )
                                    )                          
               );